package composite;

/**
 * @author wcj
 * @Date 2021/7/2 18:02
 * @Version 1.0
 */
public class Client {

    public static void main(String[] args) {
        ConcreteCompany concreteCompany = new ConcreteCompany("北京总公司");
        Finance finance = new Finance("北京财务部");
        Hr h = new Hr("北京人力资源部");
        concreteCompany.add(finance);
        concreteCompany.add(h);

        ConcreteCompany concreteCompany1 = new ConcreteCompany("华东总部");
        Finance fi = new Finance("华东财务部");
        Hr h2 = new Hr("华东人力资源部");
        concreteCompany1.add(fi);
        concreteCompany1.add(h2);

        concreteCompany.add(concreteCompany1);
        concreteCompany.display(0);
        concreteCompany.showDuty();
    }
}
